home *** CD-ROM | disk | FTP | other *** search
- method pushButton(var eventInfo Event)
- var
- tsPrn TextStream ; Printer textStream
- tcTable TCursor ; TCursor for table
- sPrintline String ; String that holds print line
- endvar
-
- tsPrn.open("prn","w") ; Open the printer for writing
-
- tcTable.open("Cust.db") ; Open the Cust table
-
- Scan tcTable : ; Loop through the entire table
-
- ; Construct a "label" by placing the data and special characters
- ; in the sPrintline string
-
- sPrintline = "\n\n" + tcTable."Name" + "\n\r" + tcTable."Street" +
- "\n\r" + tcTable."City" + ", " + tcTable."State/Prov" + " " +
- tcTable."Zip/Postal Code" + "\n\r" + tcTable."Country" + "\n\n\n\r"
-
- tsPrn.writeLine( sPrintline ) ; Write the string to the printer
-
- endScan
-
- tcTable.close() ; Close the table
- tsPrn.close() ; Close the printer
-
- endmethod